<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="path" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" type="text/css"
	href="${path }/static/css/common.css">
<link rel="stylesheet" type="text/css"
	href="${path }/static/css/dengluzc.css">
</head>
<script type="text/javascript">
	var msg = '${msg }';
	if (msg == null || msg == "") {

	} else {
		alert(msg);
	}
</script>
<body>
	<div class="right">
		<p class="bbstab">
			<a href="#" class="now" id="b0">注册</a> <a href="#" id="b1" class="">登录</a>
		</p>
		<div class="bbs">
			<form action="${path }/DoRegistServlet" method="get" name="myform">
				<table width="100%" border="0" cellspacing="1" cellpadding="3"
					class="errorbbs" style="display: block;">
					<tbody>
						<tr>
							<td height="40" align="right">昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：</td>
							<td width="215" height="43" align="left"><input name="name"
								type="text" id="realname" size="30"> <span class="red"></span></td>
						</tr>
						<td width="111" align="right">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
						<td width="341" align="left"><input name="password"
							type="password" id="idnum" size="30"> <span class="red"></span></td>

						<tr>
							<td height="40" align="right">确认密码：</td>
							<td><input name="phonenum" type="password" id="phonenum"
								size="30"></td>
						</tr>
						<td align="right">手&nbsp;&nbsp;机&nbsp;&nbsp;号：</td>
						<td><input name="username" type="text" id="email" size="30"></td>
						<tr>
							<td height="56" align="right">&nbsp;</td>
							<td colspan="3"><input type="submit" name="submit"
								id="submit" value="确认注册" class="sub"
								onclick="javascript:return identify();"></td>
						</tr>
					</tbody>
				</table>
			</form>

			<form action="${path }/DoLoginServlet" id="mail_review" method="get">
				<table width="100%" border="0" cellspacing="1" cellpadding="3"
					class="errorbbs" style="display: none;">
					<tbody>
						<tr>
							<td width="118" height="50" align="right">手机号：</td>
							<td width="184" height="50" align="left"><input
								id="username" type="text" size="30" name="username"></td>
						</tr>
						<td width="95" align="right">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
						<td width="382" align="left"><input id="c_idnum"
							type="password" size="30" name="password"></td>

						<tr>
							<td height="54" align="right">&nbsp;</td>
							<td colspan="3"><input type="submit" id="c_review"
								value="登录" class="check"></td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
		<table width="100%" border="0" cellspacing="0" cellpadding="0"
			class="bm" id="review" style="display: none; margin-bottom: 60px;">
			<tbody>
				<tr>
					<th width="50%" height="36" scope="col"></th>
					<th width="50%" scope="col"></th>
				</tr>
			</tbody>
		</table>
	</div>
</body>
<script type="text/javascript">
	var msg = '${msg }';
	if (msg != "") {
		alert(msg);
	} else {
	}
</script>
<script type="text/javascript">
	//切换

	var oli = document.getElementsByTagName("a");
	var odiv = document.getElementsByClassName("errorbbs");
	for (var i = 0; i < oli.length; i++) {
		oli[i].index = i;
		oli[i].onmouseover = function() {
			for (var i = 0; i < oli.length; i++) {
				oli[i].className = "";
				odiv[i].style.display = "none";
			}
			this.className = "now";
			odiv[this.index].style.display = "block";
		}
	}
	//验证
	var realname = document.getElementById("realname");
	var idnum = document.getElementById("idnum");
	var phonenum = document.getElementById("phonenum");
	var message = document.getElementById("message");
	var asktxt = document.getElementById("asktxt");
	var codefield = document.getElementById("codefield");
	var crealname = document.getElementById("c_realname");
	var cidnum = document.getElementById("c_idnum");

	realname.onfocus = function() {
		this.value = ("");
		this.style.color = "";
		this.style.border = "";
	}
	realname.onblur = function() {
		if (this.value == "") {
			this.value = ("昵称不能为空！");
			this.style.color = "red";
			this.style.border = "1px solid red";
		}
	}

	idnum.onfocus = function() {
		this.value = ("");
		this.style.color = "";
		this.style.border = "";
	}
	idnum.onblur = function() {
		if (this.value == "") {
			this.value = ("密码不能为空！");
			this.style.color = "red";
			this.style.border = "1px solid red";
		}
	}

	phonenum.onfocus = function() {
		this.value = ("");
		this.style.color = "";
		this.style.border = "";
	}
	phonenum.onblur = function() {
		if (this.value == "") {
			this.value = ("密码不能为空！");
			this.style.color = "red";
			this.style.border = "1px solid red";
		}
	}

	email.onfocus = function() {
		this.value = ("");
		this.style.color = "";
		this.style.border = "";
	}
	email.onblur = function() {
		if (this.value == "") {
			this.value = ("手机号不能为空！");
			this.style.color = "red";
			this.style.border = "1px solid red";
		}
	}

	codefield.onfocus = function() {
		this.value = ("");
		this.style.color = "";
		this.style.border = "";
	}
	codefield.onblur = function() {
		if (this.value == "") {
			this.value = ("验证码不能为空！");
			this.style.color = "red";
			this.style.border = "1px solid red";
		}
	}

	crealname.onfocus = function() {
		this.value = ("");
		this.style.color = "";
		this.style.border = "";
	}
	crealname.onblur = function() {
		if (this.value == "") {
			this.value = ("手机号不能为空！");
			this.style.color = "red";
			this.style.border = "1px solid red";
		}
	}

	cidnum.onfocus = function() {
		this.value = ("");
		this.style.color = "";
		this.style.border = "";
	}
	cidnum.onblur = function() {
		if (this.value == "") {
			this.value = ("密码不能为空！");
			this.style.color = "red";
			this.style.border = "1px solid red";
		}
	}
</script>
</html>